#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e6+5;

void solve(){
    int n,m;
    cin>>n>>m;
    vector<pair<int,int>> v;
    int l=0;
    for(int i=0;i<n;i++){
        int bl;
        cin>>bl;
        v.push_back({l,l+bl});
        l=l+bl;
    }
    // for(auto ele : v)cout<<ele.first<<" "<<ele.second<<endl;
    for(int i=0;i<m;i++){
        int q;
        cin>>q;
        for(int i=0;i<v.size();i++){
            if(q>=v[i].first&&q<v[i].second){
                cout<<i+1<<endl;
                break;
            }
        }
    }
    return;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    solve();

    return 0;
}